package com.example.weixincommonlog.annotation;

import com.example.weixincommonlog.enums.BusinessType;
import com.example.weixincommonlog.enums.OperatorType;

import java.lang.annotation.*;

/**
 * 自定义日志注解
 *
 * @version 1.0.0
 * @className: WxLog
 * @description: 自定义日志注解
 * @author: zhangjunfa
 * @date: 2023/7/5 15:46
 */
@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface WxLog {
    /**
     * 名称
     *
     * @return
     */
    public String title() default "";

    /**
     * 日志操作类型
     *
     * @return
     */
    public BusinessType type() default BusinessType.OTHER;

    /**
     * 操作平台
     *
     * @return
     */
    public OperatorType operator() default OperatorType.MANAGE;

    /**
     * 是否保存请求的参数
     */
    public boolean isSaveRequestData() default true;

    /**
     * 是否保存响应的参数
     */
    public boolean isSaveResponseData() default true;
}
